# eric7.EricGui.EricOverrideCursor

Module implementing a context manager class for an override cursor and a QProcess class controlling an override cursor.

### Global Attributes

None

### Classes

EricOverrideCursor | Class implementing a context manager class for an override cursor.
EricOverrideCursorProcess | Class implementing a QProcess subclass controlling an override cursor.
EricOverridenCursor | Class implementing a context manager class for an overriden cursor.

### Functions

None

## EricOverrideCursor

Class implementing a context manager class for an override cursor.

### Derived from

contextlib.AbstractContextManager

### Class Attributes

None

### Class Methods

None

### Methods

EricOverrideCursor | Constructor
__enter__ | Special method called when entering the runtime ccontext.
__exit__ | Special method called when exiting the runtime ccontext.

### Static Methods

None

#### EricOverrideCursor (Constructor)

EricOverrideCursor(cursorShape=Qt.CursorShape.WaitCursor)

Constructor

cursorShape (Qt.CursorShape)
  shape of the override cursor

#### EricOverrideCursor.__enter__

__enter__()

Special method called when entering the runtime ccontext.

Return:
  reference to the context manager object

Return Type:
  EricOverrideCursor

#### EricOverrideCursor.__exit__

__exit__(_exc_type, _exc_value, _traceback)

Special method called when exiting the runtime ccontext.

_exc_type (Class)
  type of an exception raised in the runtime context (unused)
_exc_value (Exception)
  value of an exception raised in the runtime context (unused)
_traceback (Traceback)
  traceback of an exception raised in the runtime context (unused)

Return:
  always returns None to not suppress any exception

Return Type:
  None

Up

## EricOverrideCursorProcess

Class implementing a QProcess subclass controlling an override cursor.

### Derived from

QProcess

### Class Attributes

None

### Class Methods

None

### Methods

EricOverrideCursorProcess | Constructor
__processFinished | Private slot resetting the cursor when the process finished.
__processStarted | Private slot setting the cursor after the process has started.

### Static Methods

None

#### EricOverrideCursorProcess (Constructor)

EricOverrideCursorProcess(parent=None, cursorShape=Qt.CursorShape.WaitCursor)

Constructor

parent (QObject)
  reference to the parent object
cursorShape (Qt.CursorShape)
  shape of the override cursor

#### EricOverrideCursorProcess.__processFinished

__processFinished()

Private slot resetting the cursor when the process finished.

#### EricOverrideCursorProcess.__processStarted

__processStarted()

Private slot setting the cursor after the process has started.

Up

## EricOverridenCursor

Class implementing a context manager class for an overriden cursor.

The cursor is reset upon entering the runtime context and restored upon exiting it.

### Derived from

contextlib.AbstractContextManager

### Class Attributes

None

### Class Methods

None

### Methods

EricOverridenCursor | Constructor
__enter__ | Special method called when entering the runtime ccontext.
__exit__ | Special method called when exiting the runtime ccontext.

### Static Methods

None

#### EricOverridenCursor (Constructor)

EricOverridenCursor()

Constructor

#### EricOverridenCursor.__enter__

__enter__()

Special method called when entering the runtime ccontext.

Return:
  reference to the context manager object

Return Type:
  EricOverrideCursor

#### EricOverridenCursor.__exit__

__exit__(_exc_type, _exc_value, _traceback)

Special method called when exiting the runtime ccontext.

_exc_type (Class)
  type of an exception raised in the runtime context (unused)
_exc_value (Exception)
  value of an exception raised in the runtime context (unused)
_traceback (Traceback)
  traceback of an exception raised in the runtime context (unused)

Return:
  always returns None to not suppress any exception

Return Type:
  None

Up